﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Silvermoon.UI;
using Silvermoon.Animations;

namespace Silvermoon.Controls.Toolbars
{
    public static class ToolbarStateManagers
    {
        public static readonly string CollapsedState = "Collapsed";
        public static readonly string ExpandedState = "Expanded";
        public static readonly string ButtonsHidden = "ButtonsHidden";
        public static readonly string ButtonsShown = "ButtonsShown";

        public static readonly VisualStateManager ToolbarStateManager = new VisualStateManager(
              new VisualStateGroup(
                  new VisualState(ButtonsHidden, new FloatTransition(Toolbar.ButtonVisibilityProperty, 150, null, 1f, ExponentialEase.In)),
                  new VisualState(ButtonsShown, new FloatTransition(Toolbar.ButtonVisibilityProperty, 350, 1f, 0f, BackEase.Out))
              ),
                new VisualStateGroup(
                        new VisualState(CollapsedState, new FloatTransition(Toolbar.MenuExpansionProperty, 250, null, 0f, ExponentialEase.In)),
                        new VisualState(ExpandedState, new FloatTransition(Toolbar.MenuExpansionProperty, 250, null, 1f, ExponentialEase.In))
                    )
                );
    }
}
